package com.bs.controller;

import com.bs.entity.Classes;
import com.bs.service.IClassesService;
import com.bs.service.impl.ClassesServiceimpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class ontcontroller {
    @Autowired
    ClassesServiceimpl service;

    @RequestMapping("/list")
    public String list(Model model){

        final List<Classes> getall = service.getall();
        model.addAttribute("list",getall);


        return "list";

    }

}
